home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1989 / May 89 / U0042-DoChoice - enhancem-May89 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.6 KB  |  46 lines  |  [TEXT/GEOL]

  1. Item    2393382                         19-May-89        12:08
  2.  
  3. From:   KNEPPER                         Knepper, Christopher
  4.  
  5. To:     FRIEDRICH1                      Friedrich, Steve
  6.  
  7. cc:     MACAPP.TECH$                    MACAPP Tech
  8.  
  9. Sub:    DoChoice - enhancement request
  10.  
  11. Hi Steve,
  12.  
  13.     My application in MacApp 2.0ßxxx makes extensive use of the DoChoice chain
  14. of control. Frequently, I want the actions of my DoChoice handler to be
  15. undoable. For example, I have a popup menu in a view and when a selection is
  16. made I use the popup menu's superview's DoChoice method to process the choice.
  17. However, the user may decide to "undo" his/her selection from the popup menu
  18. and right now it's hard to support this (ie override TControlTracker's
  19. TrackMouse method).
  20.  
  21.     So...I propose an enhancement request to TView.DoChoice: modify DoChoice to
  22. return a TCommand object, like DoMenuCommand.
  23.  
  24. So,
  25.  
  26.     PROCEDURE TView.DoChoice(origView: TView; itsChoice: INTEGER);
  27.  
  28. Would become:
  29.  
  30.     FUNCTION TView.DoChoice(origView: TView; itsChoice: INTEGER): TCommand;
  31.  
  32.     In this scheme, I would instantiate, initialize, and return a command
  33. object to perform the action associated with my choice, rather than handle the
  34. choice directly in a DoChoice handler.
  35.  
  36.     At a minimum, TControlTracker's TrackMouse method would need to be changed.
  37. It would need to process the TCommand object that would be returned to it by
  38. DoChoice in the trackRelease phase.
  39.  
  40. -Chris
  41.  
  42. PS: For those of you unfamiliar with the DoChoice chain, see Russ Wetmore's
  43. article "TView.DoChoice: A Quick Overview" in Frameworks (April '89).
  44.  
  45.  
  46.